package xyz.robinbingo.effectivejava.chapter02.item05.second;

import xyz.robinbingo.effectivejava.chapter02.item05.Lexicon;

import java.util.List;

// Inappropriate use of singleton - inflexible & untestable!
public class SpellChecker {
    private final Lexicon dictionary = new Lexicon();

    private SpellChecker() {
    }

    public static final SpellChecker INSTANCE = new SpellChecker();

    public boolean isValid(String word) {
        return "hello".equals(word);
    }

    public List<String> suggestions(String typo) {
        return null;
    }
}